<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
</html>
<script>
	// 如果接收到的是一个参数，那么就让它加1， 如果是两个参数，那么就让它两个参数相加
	function sum(){
		//if(arguments.length == 1){
		//	console.log(arguments[0] + 1);
		//}else if(arguments.length == 2){
		//	console.log(arguments[0] + arguments[1]);
		//}
		
		console.log(arguments.length <= 1 ? arguments[0] + 1 : arguments[0] + arguments[1])
	};

	sum(10);
	sum(2, 4);
	sum(2, 4, 4);
</script>
